home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2008 January / Cybermycha 1_2008.iso / Data.cab / _E31085AF40D34CC4882023B0BBB6028C < prev    next >
Encoding:
Text File  |  2004-07-19  |  1008 b   |  55 lines

  1.  
  2. regc(2, "COMBINED_XFORM")
  3.  
  4. regc(12, "FOG_PARAMS")
  5.  
  6. regcn(14, "DIRECTIONAL_DIR_MS", 0)
  7.  
  8. regc4f(31, %ambient_r, %ambient_g, %ambient_b, %ambient_a)
  9. // ------------ c40 - c60 reserved
  10. !include("vs_spot_consts.inc")
  11.  
  12. vshader("
  13.  
  14. #define point        v0
  15. #define normal        v1
  16. #define tcoord        v3
  17.  
  18. #define fogp    c12
  19. #define ldir    c14
  20.  
  21.     vs_1_1
  22.  
  23. #include    <cardef.h>
  24. #include    <fog.inc>
  25.  
  26.     def c0, 0, 0, 0, 0
  27.  
  28.     dcl_position    point
  29.     dcl_normal    normal
  30.     dcl_texcoord    tcoord
  31.  
  32.     ; output position
  33.     m4x4    oPos, point, c2
  34.     ; output texcoords
  35.     mov        oT0, tcoord           // color
  36.     mov        oT1, tcoord           
  37.     ; calc fog
  38.        dp4    r0.x, point, c4
  39.        FOG(r0.x, fogp, r10)
  40.  
  41.     dp3        r4.x, normal, ldir        ; diffuse N*L
  42.  
  43.     ; output diffuse
  44.     mad        oD0.w, r4.x, c31.x, c31.w     //diffuse&ambient
  45.     //mov        oD0.w, r4.x   //  sun
  46. ;------------------------------------------
  47. // spot lights
  48. // used r0 - r2
  49. #if VS_SPOTLIGHTS
  50. #include <vs_spot_func.inc>
  51. #endif
  52. ;----------------------------
  53. ")
  54.  
  55.